/***************************************************************************
 *   Copyleft 2006-2007 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>									   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#ifndef __INPUT_MANAGER_H__
#define __INPUT_MANAGER_H__

#include "../../Types/Types.h"
#include "../Objects/Object3D.h"

class Engine3D;

class InputManager {
protected:
	Object3D *mObject;
	cPoint mLBDownHit;
	cPoint mLBUpHit;
	cPoint mRBDownHit;
	cPoint mRBUpHit;
	
	cBool mLBDown;
	cBool mRBDown;
public:

    /**************************************************************
    * Constructors                                                *
    ***************************************************************/
	InputManager(): mObject(cNull), mLBDown(false), mRBDown(false) { }
	InputManager(Object3D* object): mObject(object), mLBDown(false), mRBDown(false) { }
	InputManager(const InputManager& manager);
	virtual ~InputManager(); 
        
    /**************************************************************
    * Operators                                                   *
    ***************************************************************/


    /**************************************************************
    * Other helpful functions                                     *
    ***************************************************************/
	virtual cVoid OnCommand(HWND hwnd, WPARAM wParam, LPARAM lParam, Engine3D* engine) { }
	virtual cVoid OnMouseMove(cPoint point, Engine3D* engine) { }
	virtual cVoid OnMouseWheel(cInt iDelta, Engine3D* engine) { }
	virtual cVoid OnLeftMouseDown(cPoint point, Engine3D* engine);
	virtual cVoid OnRightMouseDown(cPoint point, Engine3D* engine);
	virtual cVoid OnLeftMouseUp(cPoint point, Engine3D* engine);
	virtual cVoid OnRightMouseUp(cPoint point, Engine3D* engine);
	virtual cVoid OnKeyUp(HWND hwnd, WPARAM wParam, LPARAM lParam, Engine3D* engine) { }
	virtual cVoid OnKeyDown(HWND hwnd, WPARAM wParam, LPARAM lParam, Engine3D* engine) { }
	virtual Object3D* GetObject();
};                                                                 

#endif // __INPUT_MANAGER_H__